﻿using Newtonsoft.Json;
using Signit.Sdk;
using System;
using System.Diagnostics;

namespace SdkSample.Testing
{
    abstract class TestBase
    {
        protected readonly SignitClient client;

        protected TestBase()
        {
            var apiKey = "16af1e919633eebbcfde3dd29f1";
            var secretKey = "skc9dc4d0a27f09a047b79b956f847eee1";
            string url = "http://112.44.251.136:2576";

            client = new SignitClient(apiKey, secretKey, url);
        }

        public abstract void Test();
        protected void Log(string key, object data)
        {
            Log(key, JsonConvert.SerializeObject(data, Formatting.Indented));
        }

        protected void Log(string key, string info)
        {
            Debug.WriteLine($"[{key}] {info}");
            Console.WriteLine($"[{key}] {info}");
        }
    }
}
